package com.ruoyi.system.enums;

import com.ruoyi.common.utils.StringUtils;

public enum WorldMediaTypeEnum {
    Twitter("Twitter", "推特"),
    Facebook("Facebook", "博客"),
    abroadNews("abroadNews", "新闻"),
    abroadVideo("abroadVideo", "视频");

    public String getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(String value){
        for (WorldMediaTypeEnum mediaTypeEnum : WorldMediaTypeEnum.values()) {
            if (StringUtils.equals(mediaTypeEnum.getValue(), value)) {
                return mediaTypeEnum.getName();
            }
        }
        return "其他";
    }

    public final String value;
    public final String name;

    WorldMediaTypeEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }
}
